package com.angel.architecture.daos.impl;

import java.util.Collection;

import com.angel.architecture.daos.LanguageDAO;
import com.angel.architecture.persistence.beans.Language;
import com.angel.architecture.persistence.ids.ObjectId;
import com.angel.dao.generic.impl.GenericSpringHibernateDAO;


public class LanguageSpringHibernateDAO extends GenericSpringHibernateDAO<Language, ObjectId> implements LanguageDAO {

    public LanguageSpringHibernateDAO(){
        super(Language.class, ObjectId.class);
    }

    public Language findUniqueByName(String name) {
        return super.findUnique("name",name);
    }

    public Language findUniqueByLocale(String locale) {
        return super.findUnique("locale",locale);
    }

    public Collection<Language> findAllByActive() {
        return super.findAll("active", Boolean.TRUE);
    }

    public Collection<Language> findAllByNotActive() {
        return super.findAll("active", Boolean.FALSE);
    }
}